﻿@model MVCGrid.Core.Product
@{
    ViewBag.Title = "Create";
}
<link rel="stylesheet" type="text/css" href="/Scripts/WMD/wmd-test.css" />
<div class="container">
    <div class="content-wrapper">
        @using (Html.BeginForm())
        {
            <form class="form-horizontal">
            <legend>Create</legend>
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductName, "NAME:")
            </div>
            <div class="control-group">
                @Html.TextBoxFor(model => model.ProductName, new { @class = "span6" })
            </div>

            <div class="control-group">
                @Html.TextBoxFor(model => model.CreateDate)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.TAGS, "TAGS:")
            </div>
            <div class="control-group">
                @Html.TextBoxFor(model => model.TAGS)
            </div>
            <div class="control-group">
                @Html.DropDownListFor(model => model.ProductTypeID, (IEnumerable<SelectListItem>)ViewData["ProductTypes"])
            </div>
            
            @*    
             @Html.CheckBox("Active", false)
             @Html.CheckBox("Active", "CheckActive")
             @Html.CheckBox("Active", Model.Active.Value)  
             @Html.CheckBox("Active", Model.Active.HasValue ? Model.Active.Value : false)

             @if (Model != null)
             {
                  @Html.CheckBox("Active", Model.Active.Value)  
             }
             else
             {
                 @Html.CheckBox("Active", false)
             }

            *@

            <div class="control-group">
             @Html.CheckBox("Active", (Model != null) ? Model.Active.Value : false)
            </div>
            <div class="control-group">
                @Html.TextAreaFor(model => model.ProductText)
            </div>
            <p>
                <input class="btn btn-primary" type="submit" value="Save" />
            </p>
            </form>    
        }
    </div>
</div>
<script type="text/javascript" src="/Scripts/WMD/wmd.js"></script>

@*

@Html.TextBoxFor(model => model.Active, new { @class = "n3ocheckboxfield" })

             @Html.EditorFor(model => model.ProductName, new { @class = "span5" })

                        <form class="form-horizontal">
            <legend>Create</legend>
            <div class="control-group">
                @Html.EditorFor(model => model.ProductName, new { @class = "btn btn-primary" })
             
            </div>

               @Html.ValidationMessageFor(model => model.ProductName)

            <div class="control-group">
                @Html.TextAreaFor(model => model.ProductName)
                @Html.ValidationMessageFor(model => model.ProductText)
            </div>
                <div class="control-group">
                    @Html.EditorFor(model => model.ProductText)
                    @Html.ValidationMessageFor(model => model.ProductText)
                </div>

                        <p>
                <input class="btn btn-primary" type="submit" value="Create" />
            </p>
            </form>

*@